import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Problem from "@/views/Problem";
import Vip from "@/views/Vip";
import New from "@/views/New";
import Course from "@/views/Course";
import Teacher from "@/views/Teacher";
import UserInfo from "@/views/UserInfo";
import VipDetail from "@/views/VipDetail";
import PaySuccess from "@/views/PaySuccess";
import CourseDetail from "@/views/CourseDetail";
import PaySuccessCourse from "@/views/PaySuccessCourse";
import NewDetail from "@/views/NewDetail";
import TeacherDetail from "../views/TeacherDetail";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/problem',
        name: 'Problem',
        component: Problem
    },
    {
        path: '/vip',
        name: 'Vip',
        component: Vip
    },
    {
        path: '/vip/detail/:pk',
        name: 'VipDetail',
        component: VipDetail
    },
    {
        path: '/new',
        name: 'New',
        component: New
    },
     {
        path: '/new/detail/:pk',
        name: 'NewDetail',
        component: NewDetail
    },
    {
        path: '/course',
        name: 'Course',
        component: Course
    },
    {
        path: '/course/detail/:pk',
        name: 'CourseDetail',
        component: CourseDetail
    },
     {
        path: '/teacher',
        name: 'Teacher',
        component: Teacher
    },
    {
        path: '/teacher/detail/:pk',
        name: 'TeacherDetail',
        component: TeacherDetail
    },
    {
        path: '/userinfo',
        name: 'Userinfo',
        component: UserInfo
    },
    {
        path: '/pay/success',
        name: 'PaySuccess',
        component: PaySuccess
    },
    {
        path: '/pay/successcourse',
        name: 'PaySuccessCourse',
        component: PaySuccessCourse
    },


]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
